import React from "react";
import { RouteObject, useRoutes } from "react-router-dom";
import useLoadRoutes from "@/hooks/useLoadRoutes";

export const Router: React.FC = () => {
  const routes = useLoadRoutes();

  return useRoutes(routes as RouteObject[]);
};
